<template>
  <div>
    <Header_h />
    <div class="sq_box_content">
      <bannerInfo :info="info" />
    </div>
    <div class="new_box">
      <div class="container">
        <div class="s_flex s_align_items_start">
          <div style="width: 100%">
            <section class="core_content_left core_content">
              <div class="finance_item">
                <div class="finance_item_title">
                  <h3 class="sq_tilte2 sq_tilte_color line_h_30 ft_weight_800">海外专利情报分析</h3>
                  <h4 class="sq_tilte3 sq_content_color line_h_30 ft_weight_400">为企业提供海外专利情报</h4>
                  <p
                    class="sq_content sq_content_color line_h_26"
                  >针对区内核心行业的海外市场竞争对手专利情况进行预警分析，并定期形成以行业为导向，全球核心竞争对手专利监控为主要内容的海外预警报告，并实时发布，以产品、国别等要素为基础建立分类分级检索，供企业检索查阅，为区内出口企业开拓海外市场保驾护航。</p>
                </div>
                <div
                  class="item_list s_flex s_flex_comlou s_justify_content_between"
                  v-for="(news, index) in list.analysis"
                  :key="index"
                  @click="goNews(news)"
                  @mouseenter="enter(index)"
                  @mouseleave="leave(index)"
                  :class="check == index ? 'li_active' : ''"
                >
                  <div class="item_list_img">
                    <div class="img_wap">
                      <img class="item_list_img" :src="news.tpic" alt />
                    </div>
                  </div>
                  <div class="right_info">
                    <h3
                      class="sq_title3 line_h_30 sq_tilte_color content_spacing ft_weight_800"
                    >{{ news.title }}</h3>
                    <div class="sq_content sq_content_color">
                      <p class="ft_weight_400 line_h_26 words-hidden-2" v-html="news.content"></p>
                    </div>
                    <div class="sq_sign_btn sq_content sq_sign_btn3" @click.stop="goNews(news)">立即查看</div>
                  </div>
                </div>
              </div>
              <!-- <div class="pagination">
          <el-pagination
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="list.page"
            :page-size="list.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(list.count)"
            align="left"
          ></el-pagination>
              </div>-->
              <!-- <div class="finance_item">
                <div class="finance_item_title">
                  <h3 class="sq_tilte2 sq_tilte_color line_h_30 ft_weight_800">
                    海外诉讼预警
                  </h3>
                  <h4
                    class="sq_tilte3 sq_content_color line_h_30 ft_weight_400"
                  >
                    海外诉讼案例分享
                  </h4>
                  <p class="sq_content sq_content_color line_h_26">
                    针对区内企业主要产品出口国家和地区，整理专利诉讼案例等内容，在服务平台上汇编海外知识产权诉讼案例合集，并根据国别、行业产品等要素建立分类分级检索引擎，为区内企业开展海外知识产权工作提供指引和经验分享。
                  </p>
                </div>
                <div
                  class="
                    item_list
                    s_flex s_flex_comlou s_justify_content_between
                  "
                  v-for="(news, index) in list.warning"
                  :key="index"
                  @click="goNews(news)"
                  @mouseenter="enter(index)"
                  @mouseleave="leave(index)"
                  :class="check == index ? 'li_active' : ''"
                >
                  <div class="item_list_img">
                    <div class="img_wap">
                      <img class="item_list_img" :src="news.tpic" alt="" />
                    </div>
                  </div>
                  <div class="right_info">
                    <h3
                      class="
                        sq_title3
                        line_h_30
                        sq_tilte_color
                        content_spacing
                        ft_weight_800
                      "
                    >
                      {{ news.title }}
                    </h3>
                    <div class="sq_content sq_content_color">
                      <p
                        class="ft_weight_400 line_h_26 words-hidden-2"
                        v-html="news.content"
                      ></p>
                    </div>
                    <div
                      class="sq_sign_btn sq_content sq_sign_btn3"
                      @click.stop="goNews(news)"
                    >
                      立即查看
                    </div>
                  </div>
                </div>
              </div>-->
              <!-- <div class="pagination">
          <el-pagination
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="list.page"
            :page-size="list.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(list.count)"
            align="left"
          ></el-pagination>
              </div>-->
            </section>
          </div>
        </div>
      </div>
    </div>
    <Footer />
    <rightMenu @moveTo="moveTo" />
  </div>
</template>

<script>
import Header_h from "@/components/Header_h";
import Footer from "@/components/Footer";
import bannerInfo from "@/components/web/bannerInfo";
import { overseasanalysisInfo } from "@/api/web";
import rightMenu from "@/components/web/rightMenu";
import Cookies from "js-cookie";
// import Cookies from "js-cookie";
export default {
  components: {
    Header_h,
    Footer,
    bannerInfo,
    rightMenu,
  },
  data () {
    return {
      info: {
        title: "海外预警",
        content: "委托服务企业进行专利数据统计",
        img: require("@/assets/web/banner3.png"),
      },
      list: [],
      banner: [],
      check: -1,
    };
  },
  mounted () {
    this.getList();
  },
  methods: {
    moveTo () {
      window.scrollTo(0, 0);
    },
    async getList () {
      try {
        this.list = await overseasanalysisInfo();
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    goNews (path) {
      // if (Cookies.get("sq_token")) {
      //   window.open(path.complete_file);
      // } else {
      //   window.open(path.try_file);
      // }
      this.$router.push({ path: '/web/immediately', query: path })
    },
    webUrl (url) {
      window.open(url);
    },
    enter (index) {
      this.check = index;
    },
    leave () {
      this.check = -1;
    },
    checkItem (index) {
      this.active = index;
    },
    //每页下拉显示数据
    async handleSizeChange (size) {
      try {
        const resUser = await policyList({
          keywords: this.form.search,
          page: size,
        });
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async handleCurrentChange (currentPage) {
      try {
        const resUser = await policyList({
          keywords: this.form.search,
          page: currentPage,
        });
      } catch (e) {
        this.$message.error(e.message);
      }
    },
  },
};
</script>

<style lang="less" scoped>
.new_box {
  margin-top: -4%;
  position: relative;
  z-index: 1;
  margin-bottom: 60px;
}
.core_content .item_list_img {
  width: 240px;
  object-fit: cover;
  overflow: hidden;
  .img_wap {
    padding-bottom: 56%;
    width: 100%;
    position: relative;
    img {
      width: 100%;
      transition: all 0.5s ease;
      &:hover {
        transform: scale(1.1);
      }
    }
  }
}

.li_active {
  width: 100%;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
  border: none;
}

.right_info {
  width: 75%;
  // margin-left: 25px;
}

.core_content .item_list {
  border-bottom: 1px solid #eee;
  padding: 23px 15px;
  width: 100%;
  margin: 30px auto 0;
  background: #ffffff;
  border: 1px solid #ced4ea;
  cursor: pointer;
  transition: all 0.2s ease;
}

// .core_content .item_list:last-child {
//   margin-bottom: 0;
// }
.content_spacing {
  // margin:0 auto 10px;
}
.core_content_left {
  width: 100%;
  background-color: #fff;
  height: 100%;
}
.core_content_right {
  width: 25%;
  background-color: #fff;
}
.content_right_spacing {
  margin: 10px 0;
}
.list_right {
  border-top: 1px solid #eee;
  padding: 10px 0;
  margin: 0 10px;
}
.right_title {
  margin: 0 10px;
  padding: 10px 0;
}

.finance_item {
  padding: 30px;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
  margin-bottom: 40px;

  p {
    margin-top: 10px;
  }
  .sq_sign_btn {
    margin-top: 10px;
  }
  h4 {
    margin-top: 10px;
  }
}

@media (max-width: 750px) {
  .core_content {
    padding: 0 !important;
  }
  .finance_item:last-child {
    margin-bottom: 0;
  }
  .finance_item {
    padding: 30px 15px;
  }

  .core_content .item_list_img {
    width: 100%;
  }

  .finance_item .sq_sign_btn {
    margin: 10px auto 0;
  }
}
// .pagination{
//   width: 90%;
//   margin: 30px auto 30px;
// }
</style>